#!/usr/bin/env python

# $LastChangedBy$
# $LastChangedRevision$
# $LastChangedDate$
# $HeadURL$

from Life import *
from Day import *
import datetime
import matplotlib.pyplot as plt

joe_blow = Life( "Joe Blow", datetime.date(1990, 1, 1), 1 )
print joe_blow.getProfile()

jane_blow = Life( "Jane Blow", datetime.date(1990, 1, 1), 0 )

# Test to see if they are distinct objects and are not static
print jane_blow
print joe_blow
print jane_blow.getProfile()
print joe_blow.getProfile()

monday = Day( datetime.date(2012, 12, 24), 170.0, 70.0 )
tuesday = Day( datetime.date(2012, 12, 25), 170.0, 71.0 )
wednesday = Day( datetime.date(2012, 12, 26), 170.0, 73.0 )
thursday = Day( datetime.date(2012, 12, 27), 170.0, 69.0 )
joe_blow.addDay(monday)
joe_blow.addDay(tuesday)
joe_blow.addDay(wednesday)
joe_blow.addDay(thursday)
#days =  joe_blow.getDaysSinceDate( datetime.date(1990, 1, 1) )
days = joe_blow.getAgesInDays()
bmis = joe_blow.getBMIs()
rees_mifflin = joe_blow.calculateREEs("mifflin")
rees_rhb = joe_blow.calculateREEs("revisedharrisbenedict")
vdotO2s = joe_blow.calculateSpecificRestingVdotO2s("roza")
weights = joe_blow.getWeights()

#plt.plot( days, bmis )
#plt.plot( days, rees_mifflin, days, rees_rhb )
plt.plot( days, vdotO2s )
plt.xlabel("Days since birth")
#plt.ylabel("BMI")
#plt.ylabel("REE [kcal/day]")
plt.ylabel("VdotO2 [ml/kg/min]")
plt.show()
